package com.gxa.stu.stu.controller;


import com.gxa.stu.commin.JsonResult;
import com.gxa.stu.util.ResponseUtil;
import com.gxa.task.dto.TaskEmplLstDto;
import com.gxa.task.service.TaskService;
import io.swagger.annotations.ApiParam;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 任务表 前端控制器
 * </p>
 *
 * @author gxa
 * @since 2022-11-03
 */
@RestController
@RequestMapping("/stu/task")
public class TaskController {

    @Reference
    TaskService taskService;

    @GetMapping("/showListTask")
    public JsonResult showListTask(@ApiParam("只要唯一就是正在进行") Integer stats) {
        List<TaskEmplLstDto> taskEmplLstDtos = taskService.ShowListTask(stats);
        return taskEmplLstDtos != null ? ResponseUtil.success("查询成功", taskEmplLstDtos) : ResponseUtil.failed("201", "查询失败");
    }


}

